home *** CD-ROM | disk | FTP | other *** search
- main()
- {
- int index;
- float inversion;
-
- for(index = 1 ; index < 13 ; index = index + 1) {
- inversion = 1.0/index;
- printf("%5d%9.5f\n", index, inversion);
- }
- }
-
-
-
- /* Result of execution
-
- 1 1.00000
- 2 .50000
- 3 .33333
- 4 .25000
- 5 .20000
- 6 .16667
- 7 .14286
- 8 .12500
- 9 .11111
- 10 .10000
- 11 .09091
- 12 .08333
-
- */
-